<script>
import GmTable from "@/view/components/gmTable.vue";

export default {
  components: {
    GmTable: GmTable
  },
  data() {
    return {
      tableConfig: {
        control: 't-station',
        mainKey: 'stationCode', //数据主键，用于删除该条数据
        needDist: false,
        cancelPower: true,
      },
      tableColumns: [{
        name: 'stationName',
        label: '站点名称',
        id: 'stationName',
        search: true,
        required: false,
        searchType: 'input',
      },
        {
          name: 'stationCode',
          label: '站点编码',
          addHide: true,
          id: 'stationCode',
          search: false,
          required: false,
          hide: true,
          searchType: 'input',
        },
        {
          name: 'districtName',
          label: '所在区划',
          id: 'districtName',
          search: false,
          addHide: true,
          required: false,
          searchType: 'dict',
        },
        {
          name: 'districtCode',
          label: '所在区划',
          id: 'districtCode',
          search: false,
          required: false,
          searchType: 'dict',
          hide: true,
        },
        {
          name: 'description',
          label: '站点描述',
          notMust: true,
          id: 'description',
          search: true,
          searchType: 'input',
        },
        {
          name: 'createDate',
          label: '创建时间',
          id: 'createDate',
          search: false,
          searchType: 'state',
          addHide: true,
        },
        {
          name: 'createUserName',
          label: '创建人',
          id: 'createUserName',
          search: false,
          searchType: 'state',
          addHide: true,
        },
        {
          name: 'state',
          label: '状态',
          id: 'state',
          search: false,
          required: '/common/getItem/state',
          searchType: 'state',
        }],
    }
  },
}
</script>

<template>
  <div class="page-car">
    <gm-table :table-columns="tableColumns" :table-config="tableConfig"></gm-table>
  </div>
</template>

<style scoped>

</style>
